Skip to content

Conversation

@thomaspaulb
Copy link
Contributor

Otherwise monkey-patches could be added twice when instantiating new test classes.

…rts patches

Otherwise monkey-patches could be added twice when instantiating new test classes.
@OCA-git-bot
Copy link
Contributor

Hi @sbidoul,
some modules you are maintaining are being modified, check this out!

@sbidoul
Copy link
Member

sbidoul commented Jan 8, 2026

Is that due to a recent change or has this been there since like forever?

@sbidoul sbidoul added this to the 18.0 milestone Jan 8, 2026
@sbidoul sbidoul changed the title [FIX] test_queue_job: also add an _unregister_hook function that reverts patches [18.0][FIX] test_queue_job: also add an _unregister_hook function that reverts patches Jan 8, 2026
@thomaspaulb
Copy link
Contributor Author

Probably since 2021? https://github.com/OCA/queue/pull/275/files

I only ran into it because I backported your change from 18.0 that adds an extra test class, thus Odoo applies the hook twice; and in 16.0 there is still a test that checks if the warning that's emitted by the patched methods is emitted only once, and it was emitted twice. But in 18.0 it wouldn't be apparent because that test was removed.

@sbidoul
Copy link
Member

sbidoul commented Jan 21, 2026

/ocabot merge patch

Thanks!

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-875-by-sbidoul-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit ac897ea into OCA:18.0 Jan 21, 2026
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at f209d61. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants